/* 备注：
分两个文件引入图片的原因：
  1.项目当前提供的一般是两张图：图片@2x.png 和 图片@3x.png，没有同时包含不带后缀的
  2.RN内部会自动根据设备像素加载图片 ，不需要没有像素后缀的图片;在web端，动态加载图片的loader必须要有一张不带后缀的，找到的开源的loader方案支持的是同时有三张图，web需要单独进行处理
目前方案：
  在引入的时候根据获取的设备的像素来选择加载的图片，引入的pr是需要加的后缀，如果图片是@2x.png和@3x.png的，需要用模板字符串拼接一下，普通的图片不需要做处理

*/
import { prTail as pr } from "../utils"
const { get } = require("lodash")

export const icons = {
  tabBarIcon: {
    betRecord: {
      default: require(`./icons/home_nav_note${pr}.png`),
      active: require(`./icons/home_nav_note2${pr}.png`)
    },
    sport: {
      default: require(`./icons/home_nav_physical_culture${pr}.png`),
      active: require(`./icons/home_nav_physical_culture2${pr}.png`)
    },
    entertainment: {
      default: require(`./icons/home_nav_recreation${pr}.png`),
      active: require(`./icons/home_nav_recreation2${pr}.png`)
    },
    mine: {
      default: require(`./icons/home_nav_my${pr}.png`),
      active: require(`./icons/home_nav_my2${pr}.png`)
    }
  },
  warn: require("./icons/exclamation_mark@2x.png"),
  scanBankCard: require("./icons/add_a_bank_card_scanning@2x.png"),
  sportsNavigationSetting: require("./icons/sports_navigation_icon_setting.png"),
  navigationWallet: require("./icons/navigation_icon_wallet.png")
}

export const statusIcon = (namePath, isActive) => {
  return isActive
    ? get(icons, `[${namePath}].active`, null)
    : get(icons, `${namePath}.default`, null)
}

export const images = {
  home: {
    leftIcon: require("./images/home/home_menu.png"),
    rightIcon: require("./images/home/customer_service.png"),
    noteIcon: require("./images/home/my_note.png"),
    logoIcon: require("./images/home/logo.png"),
    notcollected: require(`./images/home/item/not_collected${pr}.png`),
    collected: require(`./images/home/item/collected${pr}.png`),
    goRightGrayIcon: require("./images/home/icon_arrow_right_gray.png")
  },
  splash: {
    bgIcon: require(`./images/splash/splash_bg${pr}.jpg`)
  },
  tabBar: {
    bg: require(`./images/tabbar/home-nav-bg${pr}.png`),
    icons: {
      home: require(`./images/tabbar/home_nav_home${pr}.png`),
      homeSelect: require(`./images/tabbar/home_nav_home2${pr}.png`),
      event: require(`./images/tabbar/home_nav_event${pr}.png`),
      eventSelect: require(`./images/tabbar/home_nav_event2${pr}.png`),
      rollingBall: require(`./images/tabbar/home_nav_rolling_ball${pr}.png`),
      rollingBallSelect: require(`./images/tabbar/home_nav_rolling_ball2${pr}.png`),
      collection: require(`./images/tabbar/home_nav_collection${pr}.png`),
      collectionSelect: require(`./images/tabbar/home_nav_collection2${pr}.png`),
      mine: require(`./images/tabbar/home_nav_my${pr}.png`),
      mineSelect: require(`./images/tabbar/home_nav_my2${pr}.png`)
    }
  },
  public: {
    activity: {
      firstDepositOffer: require("./images/public/01-first-deposit-offer.png")
    }
  },
  betRecord: {},
  sport: {
    index: {
      defaultBannerImage: require(`./images/sport/banner-default${pr}.png`),
      topInPlayTitle: require(`./images/sport/top-in-play-title${pr}.png`),
      topEventBg: require(`./images/sport/top-event-bg${pr}.png`),
      defalutTeamLogo: require(`./images/sport/even-default-team${pr}.png`)
    }
  },
  entertainment: {
    banner: {
      demoList: [
        { uri: "http://m.ld1121.com/api/gl/file/files/5d3955c8f409c252cbb545c5.jpg" },
        { uri: "http://m.ld1121.com/api/gl/file/files/5d3955d8f409c252cbb545cb.jpg" },
        { uri: "http://m.ld1121.com/api/gl/file/files/5d3955e9f409c252cbb545d1.jpg" }
      ]
    },
    index: {
      liveTitle: require(`./images/entertainment/live-title${pr}.png`),
      chessTitle: require(`./images/entertainment/chess-title${pr}.png`),
      electronTitle: require(`./images/entertainment/electron-title${pr}.png`),
      lotteryTitle: require(`./images/entertainment/lottery-title${pr}.png`)
    },
    entry: {
      chess: {
        ld: require("./images/entertainment/chess/ld.png")
      },
      electron: {
        agElectron: require("./images/entertainment/electron/ag-electron.png"),
        agFish: require("./images/entertainment/electron/ag-fish.png"),
        mwElectron: require("./images/entertainment/electron/mw-electron.png"),
        mwFish: require("./images/entertainment/electron/mw-fish.png")
      },
      live: {
        ag: require("./images/entertainment/live/ag.png")
      },
      lottery: {
        "5gm": require("./images/entertainment/lottery/5gm.png")
      },
      sport: {
        ld: require("./images/entertainment/sport/ld.png")
      }
    }
  },
  mine: {
    icons: {
      wallet: require(`./images/mine/wallet${pr}.png`),
      recharge: require(`./images/mine/recharge${pr}.png`),
      withdraw: require(`./images/mine/withdraw${pr}.png`),
      listFundDetails: require(`./images/mine/list_fund_details${pr}.png`),
      listBettingRecord: require(`./images/mine/list_betting_record${pr}.png`),
      listSecurityCenter: require(`./images/mine/list_security_center${pr}.png`),
      listLetter: require(`./images/mine/list_letter${pr}.png`),
      listPromotions: require(`./images/mine/list_promotions${pr}.png`),
      listAgencyCooperation: require(`./images/mine/list_agency_cooperation${pr}.png`),
      listSponsorshipInformation: require(`./images/mine/list_sponsorship_information${pr}.png`),
      listHelpCenter: require(`./images/mine/list_help_center${pr}.png`),
      listGameTutorial: require(`./images/mine/list_game_tutorial${pr}.png`),
      listShareIt: require(`./images/mine/list_share_it${pr}.png`),
      listAboutUs: require(`./images/mine/list_about_us${pr}.png`),
      listVersionNumber: require(`./images/mine/list_version_number${pr}.png`),
      listDropOut: require(`./images/mine/list_drop_out${pr}.png`)
    },
    betRecord: {
      winGame: require(`./images/mine/bet-record/win${pr}.png`),
      winHalfGame: require(`./images/mine/bet-record/win_half${pr}.png`),
      fliter: require(`./images/mine/bet-record/filter${pr}.png`),
      fliterBlue: require(`./images/mine/bet-record/filter_blue${pr}.png`)
    }
  },
  login: {
    loginBg: require(`./images/login/login-bg${pr}.png`),
    ballbet: require(`./images/login/ballbet${pr}.png`),
    sponsor: require(`./images/login/sponsor${pr}.png`),
    icons: {
      logInUser: require(`./images/login/icons/log_in_user${pr}.png`),
      password: require(`./images/login/icons/Password_password${pr}.png`),
      passwordEyeClose: require(`./images/login/icons/password_eye_close${pr}.png`),
      passwordEyeOpen: require(`./images/login/icons/password_eye_open${pr}.png`),
      clear: require(`./images/login/icons/clear${pr}.png`),
      rememberPswCheck: require(`./images/login/icons/remember_passwor_checked${pr}.png`),
      rememberPswUnCheck: require(`./images/login/icons/remember_passwor_unchecked${pr}.png`),
      logInMobile: require(`./images/login/icons/log_in_mobile_phone${pr}.png`),
      logInVertify: require(`./images/login/icons/log_in_verification_code${pr}.png`),
      pageShutDown2: require(`./images/login/icons/page_shut_down2${pr}.png`)
    }
  },
  noneData: {
    pageNoContent: require(`./images/none-data/page_no_content${pr}.png`),
    pageNoData: require(`./images/none-data/page_no_data${pr}.png`),
    pageNoMatch: require(`./images/none-data/page_no_match${pr}.png`),
    pageNoMessage: require(`./images/none-data/page_no_message${pr}.png`),
    pageNoNetWork: require(`./images/none-data/page_no_network${pr}.png`)
  }
}
